/*
* 3号引脚连led，慢慢亮，停1秒，再慢慢暗
*/
const int led = 3;

void setup() {
  // put your setup code here, to run once:
  pinMode(led, OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
  for(int i = 0; i < 255; ++i)
  {
    analogWrite(led, i);
    delay(20);
  }
  delay(1000);
  for(int i = 255; i > 0; i--)
  {
    analogWrite(led, i);
    delay(20);  
  }
  delay(1000);
}
